#pragma once
#include "DrawView.h"
namespace UILib
{
    class CDrawCheckBox : public CDrawView
    {
    public:
        CDrawCheckBox(void);
        CDrawCheckBox(Bitmap* pBitmap,  const PUIRect pRect, const UINT uID\
            , const int nStatusCount = 4, const int nGroupCount = 2, ViewListener* pListener = NULL );

        virtual ~CDrawCheckBox(void);

        wstring GetClass() { return L"checkbox"; };

        void SetTextOff( const int nOffW );

        void SetSel(const bool bSel);
        bool GetSel() const { return bSel_; };

        void SetText(wstring wszText, const LOGFONT lf, const COLORREF color = 0x000000 );
        void SetText(wstring wszText);

        virtual void HandleMessage( UINT uMsg, WPARAM wParam, LPARAM lParam, HWND hWnd, BOOL& bHandled );
        virtual void DrawElement( const HDC hDC, const RECT &rcPaint );
    private:
        Bitmap*     pBitMap_;
        int         nStatusCount_;
        int         nGroupCount_;
        bool        bSel_;

        int         nOffWidth_;

        wstring     wszText_;
        LOGFONT     lf_;
        COLORREF    color_;
    };
}